package com.haochang.chunkvod.model.cash;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;

/**优惠券实体类
 *     @author Yangjie
 *     className CouponInfo
 *     created at  2016/11/15  15:57
 */
public class CouponInfo implements Parcelable
{
	private String id;
	private String name;
	private String content;
	private int count;
	private int type;//0是代金券，1是优惠券
	private String unit;
	private ArrayList<CouponInfo> arrayList = new ArrayList<CouponInfo>();

	protected CouponInfo(Parcel in) {
		id = in.readString();
		name = in.readString();
		content = in.readString();
		count = in.readInt();
		type = in.readInt();
		unit = in.readString();
		arrayList = in.createTypedArrayList(CouponInfo.CREATOR);
	}

	public static final Creator<CouponInfo> CREATOR = new Creator<CouponInfo>() {
		@Override
		public CouponInfo createFromParcel(Parcel in) {
			return new CouponInfo(in);
		}

		@Override
		public CouponInfo[] newArray(int size) {
			return new CouponInfo[size];
		}
	};

	public ArrayList<CouponInfo> getArrayList() {
		return arrayList;
	}

	public void setArrayList(ArrayList<CouponInfo> arrayList) {
		this.arrayList = arrayList;
	}

	public CouponInfo()
	{
	}

	public int getType()
	{
		return type;
	}

	public void setType(int type)
	{
		this.type = type;
	}

	public String getId()
	{
		return id;
	}

	public void setId(String id)
	{
		this.id = id;
	}

	public String getName()
	{
		return name;
	}

	public void setName(String name)
	{
		this.name = name;
	}

	public String getContent()
	{
		return content;
	}

	public void setContent(String content)
	{
		this.content = content;
	}

	public int getCount()
	{
		return count;
	}

	public void setCount(int count)
	{
		this.count = count;
	}

	public String getUnit()
	{
		return unit;
	}

	public void setUnit(String unit)
	{
		this.unit = unit;
	}

	@Override
	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {

	}
}
